window.APP_EVENTS = {};

APP_EVENTS.APPLICATION_LAUNCHED = "applicationLaunched";

Ext.Loader.setConfig(
{
    enabled : true,
    disableCache : true
});
Ext.Loader.setPath(
{
    'Util' : 'app/util'
});
Ext.application(
{
    name : 'MyApp',
    appFolder : "app",
    autoCreateViewport : false,

    requires :
    [
        'Util.Auth',
        'Util.Backend'
    ],

    controllers :
    [
    ],

    init : function(app)
    {
        window.APP = app;
    },

    launch : function()
    {
        debugger
        var me = this;
        Auth.checkAuthentication(this);
    },

    afterAutorization : function()
    {
        var me = window.APP;
        Ext.USE_NATIVE_JSON = true;
        this.viewport = Ext.create('MyApp.view.Main',
        {
            application : this
        });

    },

});
